package cn.com.seederland.gkrpc.codec;

import com.alibaba.fastjson.JSON;

/**
 * @ClassName JSONDecoder
 * @Author SighFate
 * @Date 2020/10/06 22:17
 * @Version 1.0
 * @Description 基于JSON的反序列化实现
 */
public class JSONDecoder implements Decoder {

    @Override
    public <T> T decoder(byte[] bytes, Class<T> clazz) {
        return JSON.parseObject(bytes, clazz);
    }
}
